<template>
    <a-drawer
    title="日志查看"
    placement="left"
    width="70%"
    :closable="false"
    :visible="log_drawer_visible"
    @close="log_drawer_close"
    class="my-drawer"
>
    <p :key="index" v-for="(item, index) in new_lines" style="margin-bottom: 5px;">
    {{ item }}
    <a-divider />
    </p>
</a-drawer>
</template>
<script>
export default {
    components: {},
    data() {
        return {
            log_drawer_visible: false,

            new_lines:[],
            

            //mitt
            mitt_show_log_modal_id:"",
        };
    },
    mounted() {
        this.mitt_show_log_modal_id=this.$mitt.on('show_log_modal',(uid,data)  => {
            this.new_lines= data
            this.log_drawer_visible = true;
        });
    },
    beforeUnmount() {
        this.$mitt.off('show_log_modal',this.mitt_show_log_modal_id);
    },
    methods: {
        log_drawer_close() {
            this.log_drawer_visible = false
        },
    },
};
</script>
<style>
.my-drawer .ant-drawer-body {
    padding: 8px;
    font-size: 12px;
}
.my-drawer .ant-divider {
    margin: 10px 0;
}
</style>